package org.example.hotel.repository;

import org.example.hotel.entity.CheckinRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface CheckinRecordRepository extends JpaRepository<CheckinRecord, Long> {
    Optional<CheckinRecord> findByRoomIdAndCheckoutTimeIsNull(Integer roomId);
    List<CheckinRecord> findByCheckoutTimeIsNull();
}
